<?php
include_once './common.php';
if(!empty($_GET)){
	$cid=$_GET['cid'];
	$sql="SELECT * FROM shoppingcart WHERE	cid={$cid}";
	
	// echo $sql;die;
	
	$res=mysqli_query($link,$sql);
	$one=mysqli_fetch_assoc($res);
	// print_r ($one);
	$num=$one["num"]+1;
	$sql1="UPDATE shoppingcart SET num = {$num} WHERE cid = {$cid}";
	$result=mysqli_query($link,$sql1);
	$arr=array();
	if($result){
		$arr["info"]="更新成功";
		$arr["status"]=1;
	}else{
		$arr["info"]="更新失败";
		$arr["status"]=0;
	}
}
 echo json_encode($arr);
?>